//
// Created by Administrator on 2021/4/26.
//

#include "../header/hand.h"
#include <chrono>
#include <algorithm>
#include <random>

void Hand::init() {
    const char* killName = "杀";
    const char* killDesc = "你的出牌阶段，对除你外，你攻击范围内的一名角色使用，效果是对该角色造成1点伤害。\n"
                           "★游戏开始时你的攻击范围是1 。\n"
                           "★每个出牌阶段你只能使用一张【杀】。";
    cards.emplace_back(Card::CardPoint::POINT_6, killName, killDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_7, killName, killDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_8, killName, killDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_9, killName, killDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_10, killName, killDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_K, killName, killDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_7, killName, killDesc, Card::CardColor::Spades, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_8, killName, killDesc, Card::CardColor::Spades, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_8, killName, killDesc, Card::CardColor::Spades, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_9, killName, killDesc, Card::CardColor::Spades, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_9, killName, killDesc, Card::CardColor::Spades, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_10, killName, killDesc, Card::CardColor::Spades, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_10, killName, killDesc, Card::CardColor::Spades, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_10, killName, killDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_10, killName, killDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_J, killName, killDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_2, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_3, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_4, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_5, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_6, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_7, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_8, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_8, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_9, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_9, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_10, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_10, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_J, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    cards.emplace_back(Card::CardPoint::POINT_J, killName, killDesc, Card::CardColor::PlumFlower, Card::Category::Basic, Card::Type::Kill);
    const char* flashName = "闪";
    const char* flashDesc = "当你受到【杀】的攻击时，你可以使用一张【闪】来抵消【杀】的效果。\n"
                            "★闪通常情况下只能在回合外使用或打出。";
    cards.emplace_back(Card::CardPoint::POINT_2, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_2, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_3, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_4, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_5, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_6, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_7, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_8, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_9, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_10, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_J, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_J, flashName, flashDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_2, flashName, flashDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_2, flashName, flashDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Flash);
    cards.emplace_back(Card::CardPoint::POINT_K, flashName, flashDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Flash);
    const char* peachName = "桃";
    const char* peachDesc = "桃能在两种情况下使用：\n"
                            "1、在你的出牌阶段，你可以使用它来回复你的1点体力。\n"
                            "2、当有角色处于濒死状态时，你可以对该角色使用【桃】，防止该角色的死亡。\n"
                            "★例如，一名角色的剩余体力为2点，此时受到【闪电】造成的3点伤害，此时该角色处于濒死状态，该角色或其他任何人合计需使用2张【桃】才能救回（2-3+2=1）。\n"
                            "★出牌阶段，若你没有损失体力，你不可以对自己使用【桃】。";
    cards.emplace_back(Card::CardPoint::POINT_2, peachName, peachDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Peach);
    cards.emplace_back(Card::CardPoint::POINT_Q, peachName, peachDesc, Card::CardColor::SquarePiece, Card::Category::Basic, Card::Type::Peach);
    cards.emplace_back(Card::CardPoint::POINT_3, peachName, peachDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Peach);
    cards.emplace_back(Card::CardPoint::POINT_4, peachName, peachDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Peach);
    cards.emplace_back(Card::CardPoint::POINT_7, peachName, peachDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Peach);
    cards.emplace_back(Card::CardPoint::POINT_8, peachName, peachDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Peach);
    cards.emplace_back(Card::CardPoint::POINT_9, peachName, peachDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Peach);
    cards.emplace_back(Card::CardPoint::POINT_Q, peachName, peachDesc, Card::CardColor::Hearts, Card::Category::Basic, Card::Type::Peach);
    const char* lightningName = "闪电";
    const char* lightningDesc = "出牌阶段，对你使用，将【闪电】横置于你的判定区里。【闪电】于你的下个判定阶段开始结算，其效果是：目标角色进行一次判定，若判定结果为黑桃2～9的牌，则【闪电】对该角色造成3点伤害，弃置【闪电】。若判定结果不在此范围，将【闪电】移动至下家的判定区里。\n"
                                "★【闪电】的目标可能会不断的进行改变，直到它生效。若它被抵消，则将它直接移动到下家的判定区里（而不是判定后再移动）。\n"
                                "★【闪电】造成的伤害没有来源。";
    cards.emplace_back(Card::CardPoint::POINT_A, lightningName, lightningDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Lightning);
    cards.emplace_back(Card::CardPoint::POINT_Q, lightningName, lightningDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::Lightning);
    const char* noThinkingName = "乐不思蜀";
    const char* noThinkingDesc = "出牌阶段，对除你外，任意一名角色使用，将【乐不思蜀】横置于该角色的判定区里。【乐不思蜀】于该角色的判定阶段开始结算，其效果是：该角色进行一次判定，除非判定结果为红桃，否则跳过其出牌阶段。\n"
                                 "★若判定结果为红桃则没有事发生。\n"
                                 "★【乐不思蜀】在结算后都将被弃置。";
    cards.emplace_back(Card::CardPoint::POINT_6, noThinkingName, noThinkingDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::NoThinking);
    cards.emplace_back(Card::CardPoint::POINT_6, noThinkingName, noThinkingDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::NoThinking);
    cards.emplace_back(Card::CardPoint::POINT_6, noThinkingName, noThinkingDesc, Card::CardColor::PlumFlower, Card::Category::Tips, Card::Type::NoThinking);
    const char* noSlackName = "无懈可击";
    const char* noSlackDesc = "在目标锦囊生效前，抵消其对一名角色产生的效果。\n"
                              "★【无懈可击】是一张可以在其他锦囊开始结算时使用的锦囊，它只能抵消目标锦囊对一名指定角色产生的效果。\n"
                              "★【无懈可击】本身也是锦囊，所以也可以被抵消\n"
                              "★特别的，当【无懈可击】抵消【闪电】的效果后，【闪电】不会被弃置，而是继续传递给下家（见【闪电】段落）。";
    cards.emplace_back(Card::CardPoint::POINT_Q, noSlackName, noSlackDesc, Card::CardColor::SquarePiece, Card::Category::Tips, Card::Type::NoSlack);
    cards.emplace_back(Card::CardPoint::POINT_J, noSlackName, noSlackDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::NoSlack);
    cards.emplace_back(Card::CardPoint::POINT_Q, noSlackName, noSlackDesc, Card::CardColor::PlumFlower, Card::Category::Tips, Card::Type::NoSlack);
    cards.emplace_back(Card::CardPoint::POINT_K, noSlackName, noSlackDesc, Card::CardColor::PlumFlower, Card::Category::Tips, Card::Type::NoSlack);
    const char* borrowName = "借刀杀人";
    const char* borrowDesc = "出牌阶段，对除你外，装备区里有武器牌的一名角色A使用，A需对你指定的一名角色B使用一张【杀】，否则你获得A装备区里的武器。\n"
                             "★A使用【杀】时，角色技能和武器技能可以照常发动";
    cards.emplace_back(Card::CardPoint::POINT_Q, borrowName, borrowDesc, Card::CardColor::PlumFlower, Card::Category::Tips, Card::Type::Borrow);
    cards.emplace_back(Card::CardPoint::POINT_K, borrowName, borrowDesc, Card::CardColor::PlumFlower, Card::Category::Tips, Card::Type::Borrow);
    const char* grainsName = "五谷丰登";
    const char* grainsDesc = "出牌阶段，对所有角色使用。你从牌堆亮出等同于现存角色数量的牌，然后按行动顺序结算～目标角色选择并获得其中的一张。★这张牌会让包括你在内的角色每人各从一定数量的牌里挑选一张加入手牌。";
    cards.emplace_back(Card::CardPoint::POINT_3, grainsName, grainsDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::Grains);
    cards.emplace_back(Card::CardPoint::POINT_4, grainsName, grainsDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::Grains);
    const char* haveName = "无中生有";
    const char* haveDesc = "出牌阶段，对你自己使用，摸两张牌。";
    cards.emplace_back(Card::CardPoint::POINT_7, haveName, haveDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::Have);
    cards.emplace_back(Card::CardPoint::POINT_8, haveName, haveDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::Have);
    cards.emplace_back(Card::CardPoint::POINT_9, haveName, haveDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::Have);
    cards.emplace_back(Card::CardPoint::POINT_J, haveName, haveDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::Have);
    const char* duelName = "决斗";
    const char* duelDesc = "出牌阶段，对除你外任意一名角色使用。由目标角色先开始，你和他/她轮流打出一张【杀】。";
    cards.emplace_back(Card::CardPoint::POINT_A, duelName, duelDesc, Card::CardColor::SquarePiece, Card::Category::Tips, Card::Type::Duel);
    cards.emplace_back(Card::CardPoint::POINT_A, duelName, duelDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Duel);
    cards.emplace_back(Card::CardPoint::POINT_A, duelName, duelDesc, Card::CardColor::PlumFlower, Card::Category::Tips, Card::Type::Duel);
    const char* junctionName ="桃园结义";
    const char* junctionDesc = "出牌阶段，对所有角色使用。按行动顺序结算，目标角色回复1点体力。\n"
                               "★这张牌会让包括你在内的角色各回复1点体力。";
    cards.emplace_back(Card::CardPoint::POINT_6, junctionName, junctionDesc, Card::CardColor::PlumFlower, Card::Category::Tips, Card::Type::Junction);
    cards.emplace_back(Card::CardPoint::POINT_A, junctionName, junctionDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::Junction);
    const char* intrusionName = "南蛮入侵";
    const char* intrusionDesc = "出牌阶段，对除你以外的所有角色使用。按行动顺序结算～除非目标角色打出一张【杀】，否则该角色受到【南蛮入侵】对其造成的1点伤害。";
    cards.emplace_back(Card::CardPoint::POINT_7, intrusionName, intrusionDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Intrusion);
    cards.emplace_back(Card::CardPoint::POINT_K, intrusionName, intrusionDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Intrusion);
    cards.emplace_back(Card::CardPoint::POINT_7, intrusionName, intrusionDesc, Card::CardColor::PlumFlower, Card::Category::Tips, Card::Type::Intrusion);
    const char* arrowName = "万箭齐发";
    const char* arrowDesc = "出牌阶段，对除你以外的所有角色使用。按行动顺序结算～除非目标角色打出一张【闪】，否则该角色受到【万箭齐发】对其造成的1点伤害。";
    cards.emplace_back(Card::CardPoint::POINT_A, arrowName, arrowDesc, Card::CardColor::Hearts, Card::Category::Tips, Card::Type::Arrow);
    const char* leadName = "顺手牵羊";
    const char* leadDesc = "出牌阶段，对除你以外，与你距离1以内的一名角色使用。你选择并获得该角色的手牌（随机选择）、装备区或判定区里的一张牌。";
    cards.emplace_back(Card::CardPoint::POINT_3, leadName, leadDesc, Card::CardColor::SquarePiece, Card::Category::Tips, Card::Type::Lead);
    cards.emplace_back(Card::CardPoint::POINT_4, leadName, leadDesc, Card::CardColor::SquarePiece, Card::Category::Tips, Card::Type::Lead);
    cards.emplace_back(Card::CardPoint::POINT_3, leadName, leadDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Lead);
    cards.emplace_back(Card::CardPoint::POINT_4, leadName, leadDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Lead);
    cards.emplace_back(Card::CardPoint::POINT_J, leadName, leadDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Lead);
    const char* dismantleName = "过河拆桥";
    const char* dismantleDesc = "出牌阶段，对除你外任意一名角色使用。你选择该角色的手牌（随机选择一张）、装备区或判定区里的一张牌，该角色弃置这张牌。";
    cards.emplace_back(Card::CardPoint::POINT_3, dismantleName, dismantleDesc, Card::CardColor::SquarePiece, Card::Category::Tips, Card::Type::Lead);
    cards.emplace_back(Card::CardPoint::POINT_4, dismantleName, dismantleDesc, Card::CardColor::SquarePiece, Card::Category::Tips, Card::Type::Lead);
    cards.emplace_back(Card::CardPoint::POINT_Q, dismantleName, dismantleDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Lead);
    cards.emplace_back(Card::CardPoint::POINT_Q, dismantleName, dismantleDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Lead);
    cards.emplace_back(Card::CardPoint::POINT_3, dismantleName, dismantleDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Lead);
    cards.emplace_back(Card::CardPoint::POINT_4, dismantleName, dismantleDesc, Card::CardColor::Spades, Card::Category::Tips, Card::Type::Lead);
    const char* horse1Name = "爪黄飞电";
    const char* horse1Desc = "《三国演义》：“曹操骑爪黄飞电马，引十万之众，与天子猎于许田。“";
    cards.emplace_back(Card::CardPoint::POINT_K, horse1Name, horse1Desc, Card::CardColor::Hearts, Card::Category::Equip, Card::Type::Horse);
    const char* horse2Name = "的卢";
    const char* horse2Desc = "《三国志 蜀志 先主备传》：“所乘马名的卢，骑的卢走，堕襄阳城西檀溪水中，溺不得出。备急曰：‘的卢，今日危矣，可努力。’的卢乃一踊三丈，遂得过。“";
    cards.emplace_back(Card::CardPoint::POINT_5, horse2Name, horse2Desc, Card::CardColor::PlumFlower, Card::Category::Equip, Card::Type::Horse);
    const char* horse3Name = "绝影";
    const char* horse3Desc = "《三国志 魏书》：“公所乘马名绝影，为流矢所中，伤颊及足，并中公右臂。世语曰：昂不能骑，进马于公，公故免，而昂遇害”。";
    cards.emplace_back(Card::CardPoint::POINT_5, horse3Name, horse3Desc, Card::CardColor::Spades, Card::Category::Equip, Card::Type::Horse);
    const char* horse4Name = "赤兔";
    const char* horse4Desc = "《三国志 魏志 吕布传》：“布有良马名曰赤兔。”";
    cards.emplace_back(Card::CardPoint::POINT_5, horse4Name, horse4Desc, Card::CardColor::Hearts, Card::Category::Equip, Card::Type::Horse);
    const char* horse5Name = "紫骍";
    const char* horse5Desc = "《三国演义》：“曹操骑爪黄飞电马，引十万之众，与天子猎于许田。";
    cards.emplace_back(Card::CardPoint::POINT_K, horse5Name, horse5Desc, Card::CardColor::SquarePiece, Card::Category::Equip, Card::Type::Horse);
    const char* horse6Name = "大宛";
    const char* horse6Desc = "《三国演义》：“曹操骑爪黄飞电马，引十万之众，与天子猎于许田。";
    cards.emplace_back(Card::CardPoint::POINT_K, horse6Name, horse6Desc, Card::CardColor::Spades, Card::Category::Equip, Card::Type::Horse);
    const char* arms1Name = "诸葛连弩";
    const char* arms1Desc = "类型：武器\n"
                            "攻击范围：1\n"
                            "作用：出牌阶段，你可以使用任意张【杀】";
    cards.emplace_back(Card::CardPoint::POINT_A, arms1Name, arms1Desc, Card::CardColor::SquarePiece, Card::Category::Equip, Card::Type::Arms);
    cards.emplace_back(Card::CardPoint::POINT_A, arms1Name, arms1Desc, Card::CardColor::PlumFlower, Card::Category::Equip, Card::Type::Arms);
    const char* arms2Name = "寒冰剑";
    const char* arms2Desc = "类型：武器\n"
                            "攻击范围：2\n"
                            "作用：当你使用【杀】造成伤害时，你可以防止此伤害，改为弃置该目标角色的两张牌。";
    cards.emplace_back(Card::CardPoint::POINT_2, arms2Name, arms2Desc, Card::CardColor::Spades, Card::Category::Equip, Card::Type::Arms);
    const char* arms3Name = "青釭剑";
    const char* arms3Desc = "类型：武器\n"
                            "攻击范围：2\n"
                            "作用：锁定技，每当你使用【杀】攻击一名角色时，无视该角色的防具。";
    cards.emplace_back(Card::CardPoint::POINT_6, arms3Name, arms3Desc, Card::CardColor::Spades, Card::Category::Equip, Card::Type::Arms);
    const char* arms4Name = "雌雄双股剑";
    const char* arms4Desc = "类型：武器\n"
                            "攻击范围：2\n"
                            "作用：你使用【杀】，指定了一名异性角色为目标后，在【杀】结算前，你可以令对方选择一项：自己弃一张手牌或者让你从牌堆摸一张牌。";
    cards.emplace_back(Card::CardPoint::POINT_2, arms4Name, arms4Desc, Card::CardColor::Spades, Card::Category::Equip, Card::Type::Arms);
    const char* arms5Name = "貫石斧";
    const char* arms5Desc = "类型：武器\n"
                            "攻击范围：3\n"
                            "作用：目标角色使用【闪】抵消你使用【杀】的效果时，你可以弃两张牌，则【杀】依然造成伤害。";
    cards.emplace_back(Card::CardPoint::POINT_5, arms5Name, arms5Desc, Card::CardColor::SquarePiece, Card::Category::Equip, Card::Type::Arms);
    const char* arms6Name = "青龍偃月刀";
    const char* arms6Desc = "类型：武器\n"
                            "攻击范围：3\n"
                            "作用：当你使用的【杀】被【闪】抵消时，你可以立即对相同的目标再使用一张【杀】，直到【杀】生效或你不愿意出了为止。";
    cards.emplace_back(Card::CardPoint::POINT_5, arms6Name, arms6Desc, Card::CardColor::Spades, Card::Category::Equip, Card::Type::Arms);
    const char* arms7Name = "丈八长矛";
    const char* arms7Desc = "类型：武器\n"
                            "攻击范围：3\n"
                            "作用：当你需要使用（或打出）一张【杀】时，你可以将两张手牌当一张【杀】使用（或打出）。";
    cards.emplace_back(Card::CardPoint::POINT_Q, arms7Name, arms7Desc, Card::CardColor::Spades, Card::Category::Equip, Card::Type::Arms);
    const char* arms8Name = "方天画戟";
    const char* arms8Desc = "类型：武器\n"
                            "攻击范围：4\n"
                            "作用：当你使用的【杀】是你的最后一张手牌时，你可以为这张【杀】指定至多三名目标角色，然后按行动顺序结算之。";
    cards.emplace_back(Card::CardPoint::POINT_Q, arms8Name, arms8Desc, Card::CardColor::SquarePiece, Card::Category::Equip, Card::Type::Arms);
    const char* arms9Name = "麒麟弓";
    const char* arms9Desc = "类型：武器\n"
                            "攻击范围：5\n"
                            "作用：你使用【杀】对目标角色造成伤害时，你可以将其装备区里的一匹马弃置。";
    cards.emplace_back(Card::CardPoint::POINT_5, arms9Name, arms9Desc, Card::CardColor::Hearts, Card::Category::Equip, Card::Type::Arms);
    const char* armor1Name = "八卦阵";
    const char* armor1Desc = "类型：防具\n"
                             "作用：每当你需要使用（或打出）一张【闪】时，你可以进行一次判定：若结果为红色，则视为你使用（或打出）了一张【闪】；若为黑色，则你仍可以从手牌里使用（或打出）。";
    cards.emplace_back(Card::CardPoint::POINT_2, armor1Name, armor1Desc, Card::CardColor::PlumFlower, Card::Category::Equip, Card::Type::Armor);
    cards.emplace_back(Card::CardPoint::POINT_2, armor1Name, armor1Desc, Card::CardColor::Spades, Card::Category::Equip, Card::Type::Armor);
    const char* armor2Name = "仁王盾";
    const char* armor2Desc = "类型：防具\n"
                             "作用：锁定技，黑色的【杀】对你无效。\n"
                             "★【决斗】过程中【仁王盾】无效。";
    cards.emplace_back(Card::CardPoint::POINT_2, armor2Name, armor2Desc, Card::CardColor::PlumFlower, Card::Category::Equip, Card::Type::Armor);
}

void Hand::reDeck() {
    unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
    shuffle(cards.begin(), cards.end(), std::default_random_engine(seed));
    for (auto &item : cards) deck                                                                                                                                                                                                                                                                                                                                                        .push(&item);
}

Hand::Hand(std::vector<Player> player): players(std::move(players)) {
    init();
    reDeck();
    currentPlayer = &players[0];
}

Hand::Hand(std::vector<Player>&& players): players(std::move(players)) {
    init();
    reDeck();
    currentPlayer = &players[0];
}

void Hand::start() {

}

const std::vector<Player> &Hand::getPlayers() const {
    return players;
}


